package org.reborn.engine.system

import SystemMessage._

/**
 * Special System that allows the SystemManager to have a common way to
 * start the necessary chain of dependent updates, setups, and shutdowns
 * for all the systems.
 *
 * Similar to LoopStart
 */
sealed class LoopEnd(private val sysMan:SystemManager) extends System {

  def update(dt: Double): Unit = {  
	  //Send a message to the SystemManager that all other Systems
	  //have finished their updates and that a new loop can be started
	  sysMan ! LoopFinished
  }
  
  override def setup() = {
	  sysMan ! InitializationFinished
  }

}